﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

namespace PackageAPI.Migrations
{
    public partial class init : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "PackageInfos",
                columns: table => new
                {
                    ID = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    PhoneName = table.Column<string>(type: "VARCHAR(50)", nullable: false),
                    CPUID = table.Column<int>(type: "integer", nullable: false),
                    BatteryID = table.Column<int>(type: "integer", nullable: false),
                    ShellID = table.Column<int>(type: "integer", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PackageInfos", x => x.ID);
                });

            migrationBuilder.InsertData(
                table: "PackageInfos",
                columns: new[] { "ID", "BatteryID", "CPUID", "CreateTime", "PhoneName", "ShellID" },
                values: new object[] { 1, 1, 1, new DateTime(2022, 1, 12, 17, 55, 22, 7, DateTimeKind.Local).AddTicks(7344), "华为手机", 1 });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "PackageInfos");
        }
    }
}
